<?php
class UserController{
	
	function UserController()
	{
		//contructor esta vaciao por ahora
	}
	
	function create($username, $password, $email)
	{
		//crear usuario en bd
	}
	
	function login($username, $password)
	{
		if($this->authenticate($username, $password))
		{
		session_start();
		
		$user = new UserModel($username);
		
		$_SESSION['user'] = $user;
		
		return true;
		}
		else{
		return false;
			}
	}
	
	static function authenticate($u, $p)
	{
		$authentic = false;
		
		if($u == 'ASANICOYA' && $p == '12345678') $authentic = true;
		return $authentic;
	}
	
	function logout()
	{
		session_start();
		session_destroy();
	}
	
					}

?>